package cloud.xlh.auto_configuration;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : example
 * @ Author: XuLeHuang
 * @ Date: 2023/1/31 11:34
 * @ Description:
 */

@Slf4j
@Component
public class Dog implements InitializingBean {
    private String name = "五红";

    public Dog() {
        log.error("实例化->{},name:{}" , "Dog constructor run..." , name);
    }

    @PostConstruct
    public void afterInit() {
        log.error("初始化后->{},name:{}" , "Dog PostConstruct run..." , name);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        log.error("设置注入后->{},name:{}" , "Dog afterPropertiesSet run..." , name);
    }
}
